-- GENERATED SPELL FOR [Ravaged Cadaver] --


function spell0_10381(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(13446,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10381', 592, 1)
end

function spell1_10381(pUnit, Event) --@Summon Broken Cadaver,Self--
pUnit:FullCastSpellOnTarget(16324,pUnit)
pUnit:RegisterEvent('Sorts_10381', 543, 1)
end

function Sorts_10381(pUnit, Event)
local choix_sorts_10381 = math.random(0, 1)
if choix_sorts_10381 == 0 then
pUnit:RegisterEvent('spell0_10381', 1, 1)
end
if choix_sorts_10381 == 1 then
pUnit:RegisterEvent('spell1_10381', 1, 1)
end
end

function mob10381_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10381', math.random(1500, 3000), 1)
end

function mob10381_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10381_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10381_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10381, 1, 'mob10381_Action')
RegisterUnitEvent(10381, 2, 'mob10381_Leave')
RegisterUnitEvent(10381, 3, 'mob10381_Kill')
RegisterUnitEvent(10381, 4, 'mob10381_Die')
